pp108 : Examples of Add

Examples of Add

This topic provides examples for the operation type - .

Add with Select

Target Element before Message Mapping

Source Element

Target Element after Message Mapping

The Target element is/UpdateInput/Update/tupleand the XML structure of the Target element before mapping the message is as follows:

<UpdateInput>
    <Update>
        <tuple>
            <old/>
        </tuple>
    </Update>
</UpdateInput>

The Source element is/newand the XML structure of the Source element will be as follows:

<new>
    <Orders>
        <OrderID>100</OrderID>
    </Orders>
</new>

<UpdateInput>
    <Update>
        <tuple>
            <old/>
            <new>
                <Orders>
                    <OrderID>100</OrderID>
                </Orders>
            </new>
        </tuple>
    </Update>
</UpdateInput>


Add with Fixed Value

Target Element before Message Mapping

Source Element

Target Element after Message Mapping

The Target element is/Orders/OrderIDand the XML structure of Target element before mapping the message is as follows:

<Orders>
    <OrderID/>
</Orders>

The Source element is250and the XML structure of the Source element is250.

<Orders>
    <OrderID>250</OrderID>
</Orders>


Add with Expression

Target Element before Message Mapping

Source Element

Target Element after Message Mapping

The Target element is/Employee/AnnualSalaryand the XML structure of the Target element before mapping the message is as follows:

<Employee>
    <AnnualSalary/>
</Employee>

The Source element isEmployee/MonthlySalary * 12and the XML structure of the Source element is1000 * 12 = 12000.

<Employee>
    <AnnualSalary>12000</AnnualSalary>
</Employee>


Add with XML Structure

Target Element before Message Mapping

Source Element

Target Element after Message Mapping

The Target element is/UpdateInput/Update/tupleand the XML structure of the Target element before mapping the message is as follows:

<UpdateInput>
    <Update>
        <tuple>
            <old/>
        </tuple>
    </Update>
</UpdateInput>

The Source element is<new><Orders><OrderID/></Orders></new>and the XML structure of Source element will be as follows:

<new>
    <Orders>
        <OrderID/>
    </Orders>
</new>

<UpdateInput>
    <Update>
        <tuple>
            <old/>
            <new>
                <Orders>
                    <OrderID/>
                </Orders>
            </new>
        </tuple>
    </Update>
</UpdateInput>


Related concepts

Pre Assignments
Post Assignments

Related tasks

Creating Assignments

Related reference

Operation Types
Examples of Add XML as String
Examples of Delete
Examples of Replace Content With
Examples of Replace With
Examples of Replace XML as String